<div class="add_category">
    <a href="/admin/category/add/"><img src="/res/img/admin/add_icon.gif" /></a> 
    <a href="/admin/category/add/">Добавить категорию</a> | 
    <a href="/admin/category/order/">Сортировать</a>
</div>

<div id="content">
		<div id="inner">
		<table cellspacing="0" cellpadding="4">
			<thead>
				<tr>
					<td width="170px">Название категори</td>

                    <td width="130px"></td>
                    <td>Описание</td>
					<td width="130px">Редактировать</td>
				</tr>
			</thead>
			<tbody class="cat">
			{foreach from=$category item=doc}
				<tr class="pane" id="{$doc.id}">
					<th><img src="/res/img/admin/category.gif" class="left" /> <a href="/admin/category/view/{$doc.id}" class="screenshot" rel="/res/img/category/{$doc.thumb}">{$doc.name}</a></th>
                    <td>{$doc.count} фото</td>
					<td>{$doc.description}</td>
					<td class="edit">
                        <a href="/admin/category/add/{$doc.id}/"><img src="/res/img/admin/add_icon.gif" /></a><a href="/admin/category/edit/{$doc.id}"><img src="/res/img/admin/edit.gif" /></a>
                        {if !$doc.parent}<a class="delete" href="#" rel="{$doc.name}"><img src="/res/img/admin/delete_icon.gif" /></a>{/if}
                    </td>
				</tr>
			{if $doc.parent}
				{foreach from=$doc.parent item=parent}
				<tr class="parent pane" id="{$parent.id}">
					<th><img src="/res/img/admin/sub_category_icon.gif" /><img src="/res/img/admin/subcategory.gif" class="left" /> <a href="/admin/category/view/{$parent.id}" class="screenshot" rel="/res/img/category/{$parent.thumb}">{$parent.name}</a></th>
					<td>{$parent.count} фото</td>
                    <td>{$parent.description}</td>
					<td class="edit"><img src="/res/img/admin/plus_off.gif" /><a href="/admin/category/edit/{$parent.id}"><img src="/res/img/admin/edit.gif" /></a> <a class="delete" href="#" rel="{$parent.name}"><img src="/res/img/admin/delete_icon.gif" /></a></td>
				</tr>
				{/foreach}
			{/if}
			{/foreach}
			</tbody>
		</table>
		</div>
	</div>
<div class="loading px150 center paddingtb paddinglr" style="text-align: center; margin-top: 20px;"><img src="/res/img/admin/preloader.gif" /><br />Отправка данных....</div>
<div class="success"></div>